import {request} from "../../request"

export function jsqx(loginData) {
  return request({
    url: '/roles',
    method: 'get'
  })
}
export function addjs(loginData) {
  return request({
    url: '/roles',
    method: 'post',
    data: {
    roleName: loginData.roleName,
    roleDesc: loginData.roleDesc
    }
  })
}
export function bjjsrequest(loginData) {
  return request({
    url: '/roles'+'/'+loginData.id,
    method:'put',
    data:{
        roleName:loginData.roleName,
        roleDesc:loginData.roleDesc
    }
  })
}
export function scjsrequest(loginData) {
  return request({
    url: '/roles'+'/'+loginData.id,
    method:'delete',
  })
}
// 删除角色权限
export function scqxrequest(loginData) {
  return request({
    url: '/roles'+'/'+loginData.roleId+'/rights'+'/'+loginData.rightId,
    method:'delete',
  })
}
export function fprequest(loginData) {
  return request({
    url: '/roles'+'/'+loginData.id+'/rights',
    method:'post',
    data:{
      rids:loginData.rids
    }
  })
}